<template>
   <div class="data_taxt">
        <button @click="handleSub">-</button>
        <span>{{ count }}</span>
        <button @click="handleAdd">+</button>

   </div>
</template>

<script>
export default {
    props:{
        count:Number
    },
    methods:{
        handleAdd(){
            this.$emit("changeCount",this.count +1)
        },
        handleSub(){
            this.$emit("changeCount",this.count -1)
        }
    }

} 
</script>

<style scoped>
    .data_taxt{
        margin: 20px;
    }
</style>